package song.NO_2;

import java.util.Scanner;

public class Main {
    static int len1 = 0;
    static int len2 = 0;
    public static void main(String[] args){
        System.out.println("请输入第一个链表长度:");
        Scanner input = new Scanner(System.in);
        len1 = input.nextInt();
        System.out.println("请输入第一个链表长度:");
        input = new Scanner(System.in);
        len2 = input.nextInt();
        System.out.println("请输入" + len1 + "个数据");
        int[] nums1 = new int[len1];
        for (int i = 0; i != len1; ++i) {
            input = new Scanner(System.in);
            nums1[i] = input.nextInt();
        }
        System.out.println("请输入" + len2 + "个数据");
        int[] nums2 = new int[len2];
        for (int i = 0; i != len2; ++i) {
            input = new Scanner(System.in);
            nums2[i] = input.nextInt();
        }
//        for (int i : nums1) System.out.println(i);
//        for (int i : nums2) System.out.println(i);
        Lianbiao l1 = new Lianbiao(nums1);
//        l1.print(l1.head_return());
        Lianbiao l2 = new Lianbiao(nums2);
//        l2.print(l2.head_return());
        addTwoNumbers a1 = new addTwoNumbers(l1, l2);
        a1.add();
    }

}
